<!--
Handles the account settings for a teacher's affliations (i.e., schools).

@author Michael Argarin
@version Second Semester, AY 2010-2011
-->
 <?php include("fetchData.php"); ?>
       	<?php $result=fetchAccountSchoolJoin();?>
			<div style="float: left;">
            <div class="form_section"><h1>Affiliations <input type="button" value="Add a school" onClick="win=window.open('addSchool.php','Add a School','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400');"></h1></div>
            <?php if(mysql_num_rows($result)==0){?>
                <span>You do not have any affiliations yet.</span>
                <ul>
            <?php }else{
				while($data=mysql_fetch_array($result))
					echo "<li class='pMirror'>".$data['school_name']." <input type=\"button\" value=\"Edit\" onClick=\"win=window.open('editSchool.php?school_id=".$data['school_id']."','Add a School','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400');\"> <input type=\"button\" value=\"Delete\" onclick=\"window.location='deleteSchool.php?school_id=".$data['school_id']."'\"></li>";
            }?>
			</ul></div>